<?php
$toolbar    =new ToolBarHelper($act);
$toolbar->setSubmitAjax(true);

if($act=="add" )
{
    $toolbar->SetTitle('[New]');
    $toolbar->Back(getUrlBack());
    $toolbar->Save('Save',2);
    $toolbar->Save('Save & Exit');
}
else if($act=="edit")
{
    $toolbar->SetTitle('[Edit]');
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
    $toolbar->Save();
}
else
{
    $toolbar->setSubmitAjax(false);
    $toolbar->Delete();
    $toolbar->Apply();
    $toolbar->addNew('add','New ','id='.$id);
}
?>